﻿using AVCUMPlatform.CORPWXService.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AVCUMPlatform.CORPWXService.Interface
{
    public interface ICorpWXPlatformApiHelper
    {
        /// <summary>
        /// 发送取消预约消息
        /// </summary>
        /// <param name="openId"></param>
        /// <param name="title">eg: 自习预约/场地预约</param>
        /// <param name="time">eg: 2020年12月23日 上午十点</param>
        /// <param name="siteName">eg: 泉山17号楼 101</param>
        /// <param name="reason">eg: 与课表安排冲突</param>
        /// <param name="bookingCancel"></param>
        /// <param name="orderId"></param>
        /// <param name="remark">eg: 谢谢您的理解与支持！</param>
        /// <returns></returns>
        public SendTemplateMsgRes SendCancelOrderMsg(string openId, string title,
            string time, string siteName, string reason, string bookingCancel, int orderId, string remark = "谢谢您的理解与支持!");

        /// <summary>
        /// 发送取消批量预约消息
        /// </summary>
        /// <param name="openId"></param>
        /// <param name="title">eg: 自习预约/场地预约</param>
        /// <param name="project"></param>
        /// <param name="time">eg: 2020年12月23日 上午十点</param>
        /// <param name="siteName">eg: 泉山17号楼 101</param>
        /// <param name="reason">eg: 与课表安排冲突</param>
        /// <param name="bookingCancel"></param>
        /// <param name="batchOrderId"></param>
        /// <param name="remark">eg: 谢谢您的理解与支持！</param>
        /// <returns></returns>
        public SendTemplateMsgRes SendCancelBatchOrderMsg(string openId, string title, string project,
            string time, string siteName, string reason, string bookingCancel, int batchOrderId, string remark = "谢谢您的理解与支持!");

        /// <summary>
        /// 发送待审批提醒
        /// </summary>
        /// <param name="openId"></param>
        /// <param name="orderId">预约id</param>
        /// <param name="applicantName">eg：张三</param>
        /// <param name="flowName">eg: 重要会议预约</param>
        /// <param name="content">eg: 场地：A01，使用时间：2019-12-23日第五节</param>
        /// <param name="applyTime">2020-12-23 12:23</param>
        /// <param name="auditRemind"></param>
        /// <returns></returns>
        SendTemplateMsgRes SendAuditRemindMsg(string openId, int orderId,
            string applicantName, string flowName, string content, string applyTime, string auditRemind);

        /// <summary>
        /// 发送批量待审批提醒
        /// </summary>
        /// <param name="openId"></param>
        /// <param name="orderId">预约id</param>
        /// <param name="applicantName">eg：张三</param>
        /// <param name="flowName">eg: 重要会议预约</param>
        /// <param name="content">eg: 场地：A01，使用时间：2019-12-23日第五节</param>
        /// <param name="applyTime">2020-12-23 12:23</param>
        /// <param name="auditRemind"></param>
        /// <returns></returns>
        SendTemplateMsgRes SendBatchAuditRemindMsg(string openId, int orderId,
            string applicantName, string flowName, string content, string applyTime, string auditRemind);

        /// <summary>
        /// 发送待审批提醒
        /// </summary>
        /// <param name="openId"></param>
        /// <param name="orderId">预约id</param>
        /// <param name="applicantName">eg：张三</param>
        /// <param name="flowName">eg: 重要会议预约</param>
        /// <param name="content">eg: 场地：A01，使用时间：2019-12-23日第五节</param>
        /// <param name="applyTime">2020-12-23 12:23</param>
        /// <param name="auditName"></param>
        /// <param name="auditRemind"></param>
        /// <returns></returns>
        public SendTemplateMsgRes SendAdjustAuditRemindMsg(string openId, int orderId,
            string applicantName, string flowName, string content, string applyTime, string auditName, string auditRemind, int type = 1);

        /// <summary>
        /// 发送审批状态提醒
        /// </summary>
        /// <param name="openId"></param>
        /// <param name="auditorName"></param>
        /// <param name="flowType">场地/自习</param>
        /// <param name="site">17号楼A101</param>
        /// <param name="time">第八周 星期四 第3节</param>
        /// <param name="res">审批通过/驳回</param>
        /// <param name="bookingReject"></param>
        /// <param name="bookingApprove"></param>
        /// <param name="orderId"></param>
        /// <returns></returns>
        public SendTemplateMsgRes SendBookingStatusMsg(string openId, string auditorName,
            string flowType, string site, string time, string res, string bookingReject, string bookingApprove, int orderId);

        /// <summary>
        /// 发送通知
        /// </summary>
        /// <param name="openId"></param>
        /// <param name="toUserName">eg: 张三</param>
        /// <param name="title">eg: 全校放假通知</param>
        /// <param name="datetime">2020-12-23 12:23</param>
        /// <param name="content">庆祝台湾解放，全校放假一天，请知晓</param>
        /// <param name="remark">谢谢合作！</param>
        /// <returns></returns>
        SendTemplateMsgRes SendInform(string openId,
            string toUserName, string title, string datetime, string content);

        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        CorpWXUserInfo GetUserInfo(string code);

        /// <summary>
        /// 发给场地管理员消息
        /// </summary>
        /// <param name="openId"></param>
        /// <param name="flowType">场地/自习</param>
        /// <param name="site">17号楼A101</param>
        /// <param name="time">第八周 星期四 第3节</param>
        /// <param name="res">审批通过/驳回</param>
        /// <returns></returns>
        SendTemplateMsgRes SendToSiteManagerRemind(string openId, string flowType, string site, string time, string res, int orderId);

        /// <summary>
        /// 发布菜单
        /// </summary>
        /// <param name="firstMenuName"></param>
        CorpWXRes PublishMenu(string firstMenuName);

        /// <summary>
        /// 发送模板消息
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        SendTemplateMsgRes SendTemplateMsg(CorpWXTemplateMsgRM data);

        /// <summary>
        /// 发送普通消息
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        SendTemplateMsgRes SendNormalMsg(CorpWXNormalMsgRM data);

        /// <summary>
        /// 通过手机号发送普通消息
        /// </summary>
        /// <param name="userPhones">用户手机号（多个逗号隔开）</param>
        /// <param name="content">内容</param>
        /// <returns></returns>
        SendTemplateMsgRes SendNormalMsgByPhones(string userPhones, string content);
    }
}
